/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package uimigration.mappingtable.impl;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

import uimigration.Interactions.InteractionsPackage;
import uimigration.Interactions.impl.InteractionsPackageImpl;
import uimigration.Plateform.PlateformPackage;
import uimigration.Plateform.impl.PlateformPackageImpl;
import uimigration.WidgetsModel.WidgetsModelPackage;
import uimigration.WidgetsModel.impl.WidgetsModelPackageImpl;
import uimigration.mappingtable.ActionType;
import uimigration.mappingtable.BehaviourType;
import uimigration.mappingtable.MappingActionEvent;
import uimigration.mappingtable.MappingBehaviourEvent;
import uimigration.mappingtable.MappingPositionningProperties;
import uimigration.mappingtable.MappingTable;
import uimigration.mappingtable.MappingtableFactory;
import uimigration.mappingtable.MappingtablePackage;
import uimigration.mappingtable.PositionningType;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class MappingtablePackageImpl extends EPackageImpl implements
		MappingtablePackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass mappingActionEventEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass mappingBehaviourEventEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass mappingPositionningPropertiesEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass mappingTableEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum actionTypeEEnum = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum behaviourTypeEEnum = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum positionningTypeEEnum = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see uimigration.mappingtable.MappingtablePackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private MappingtablePackageImpl() {
		super(eNS_URI, MappingtableFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this
	 * model, and for any others upon which it depends.  Simple
	 * dependencies are satisfied by calling this method on all
	 * dependent packages before doing anything else.  This method drives
	 * initialization for interdependent packages directly, in parallel
	 * with this package, itself.
	 * <p>Of this package and its interdependencies, all packages which
	 * have not yet been registered by their URI values are first created
	 * and registered.  The packages are then initialized in two steps:
	 * meta-model objects for all of the packages are created before any
	 * are initialized, since one package's meta-model objects may refer to
	 * those of another.
	 * <p>Invocation of this method will not affect any packages that have
	 * already been initialized.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static MappingtablePackage init() {
		if (isInited)
			return (MappingtablePackage) EPackage.Registry.INSTANCE
					.getEPackage(MappingtablePackage.eNS_URI);

		// Obtain or create and register package
		MappingtablePackageImpl theMappingtablePackage = (MappingtablePackageImpl) (EPackage.Registry.INSTANCE
				.getEPackage(eNS_URI) instanceof MappingtablePackageImpl ? EPackage.Registry.INSTANCE
				.getEPackage(eNS_URI)
				: new MappingtablePackageImpl());

		isInited = true;

		// Obtain or create and register interdependencies
		WidgetsModelPackageImpl theWidgetsModelPackage = (WidgetsModelPackageImpl) (EPackage.Registry.INSTANCE
				.getEPackage(WidgetsModelPackage.eNS_URI) instanceof WidgetsModelPackageImpl ? EPackage.Registry.INSTANCE
				.getEPackage(WidgetsModelPackage.eNS_URI)
				: WidgetsModelPackage.eINSTANCE);
		PlateformPackageImpl thePlateformPackage = (PlateformPackageImpl) (EPackage.Registry.INSTANCE
				.getEPackage(PlateformPackage.eNS_URI) instanceof PlateformPackageImpl ? EPackage.Registry.INSTANCE
				.getEPackage(PlateformPackage.eNS_URI)
				: PlateformPackage.eINSTANCE);
		InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE
				.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE
				.getEPackage(InteractionsPackage.eNS_URI)
				: InteractionsPackage.eINSTANCE);

		// Create package meta-data objects
		theMappingtablePackage.createPackageContents();
		theWidgetsModelPackage.createPackageContents();
		thePlateformPackage.createPackageContents();
		theInteractionsPackage.createPackageContents();

		// Initialize created meta-data
		theMappingtablePackage.initializePackageContents();
		theWidgetsModelPackage.initializePackageContents();
		thePlateformPackage.initializePackageContents();
		theInteractionsPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theMappingtablePackage.freeze();

		return theMappingtablePackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMappingActionEvent() {
		return mappingActionEventEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMappingActionEvent_Event() {
		return (EReference) mappingActionEventEClass.getEStructuralFeatures()
				.get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMappingActionEvent_ActionType() {
		return (EAttribute) mappingActionEventEClass.getEStructuralFeatures()
				.get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMappingBehaviourEvent() {
		return mappingBehaviourEventEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMappingBehaviourEvent_Event() {
		return (EReference) mappingBehaviourEventEClass
				.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMappingBehaviourEvent_BehaviorType() {
		return (EAttribute) mappingBehaviourEventEClass
				.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMappingPositionningProperties() {
		return mappingPositionningPropertiesEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMappingPositionningProperties_Property() {
		return (EReference) mappingPositionningPropertiesEClass
				.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMappingPositionningProperties_PositionType() {
		return (EAttribute) mappingPositionningPropertiesEClass
				.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMappingTable() {
		return mappingTableEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMappingTable_Name() {
		return (EAttribute) mappingTableEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMappingTable_EventsAction() {
		return (EReference) mappingTableEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMappingTable_EventsBehaviors() {
		return (EReference) mappingTableEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getMappingTable_PropertiesBehaviors() {
		return (EReference) mappingTableEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getActionType() {
		return actionTypeEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getBehaviourType() {
		return behaviourTypeEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getPositionningType() {
		return positionningTypeEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MappingtableFactory getMappingtableFactory() {
		return (MappingtableFactory) getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated)
			return;
		isCreated = true;

		// Create classes and their features
		mappingActionEventEClass = createEClass(MAPPING_ACTION_EVENT);
		createEAttribute(mappingActionEventEClass,
				MAPPING_ACTION_EVENT__ACTION_TYPE);
		createEReference(mappingActionEventEClass, MAPPING_ACTION_EVENT__EVENT);

		mappingBehaviourEventEClass = createEClass(MAPPING_BEHAVIOUR_EVENT);
		createEAttribute(mappingBehaviourEventEClass,
				MAPPING_BEHAVIOUR_EVENT__BEHAVIOR_TYPE);
		createEReference(mappingBehaviourEventEClass,
				MAPPING_BEHAVIOUR_EVENT__EVENT);

		mappingPositionningPropertiesEClass = createEClass(MAPPING_POSITIONNING_PROPERTIES);
		createEAttribute(mappingPositionningPropertiesEClass,
				MAPPING_POSITIONNING_PROPERTIES__POSITION_TYPE);
		createEReference(mappingPositionningPropertiesEClass,
				MAPPING_POSITIONNING_PROPERTIES__PROPERTY);

		mappingTableEClass = createEClass(MAPPING_TABLE);
		createEAttribute(mappingTableEClass, MAPPING_TABLE__NAME);
		createEReference(mappingTableEClass, MAPPING_TABLE__EVENTS_ACTION);
		createEReference(mappingTableEClass, MAPPING_TABLE__EVENTS_BEHAVIORS);
		createEReference(mappingTableEClass,
				MAPPING_TABLE__PROPERTIES_BEHAVIORS);

		// Create enums
		actionTypeEEnum = createEEnum(ACTION_TYPE);
		behaviourTypeEEnum = createEEnum(BEHAVIOUR_TYPE);
		positionningTypeEEnum = createEEnum(POSITIONNING_TYPE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	public void initializePackageContents() {
		if (isInitialized)
			return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		WidgetsModelPackage theWidgetsModelPackage = (WidgetsModelPackage) EPackage.Registry.INSTANCE
				.getEPackage(WidgetsModelPackage.eNS_URI);

		// Add supertypes to classes

		// Initialize classes and features; add operations and parameters
		initEClass(mappingActionEventEClass, MappingActionEvent.class,
				"MappingActionEvent", !IS_ABSTRACT, !IS_INTERFACE,
				IS_GENERATED_INSTANCE_CLASS);
		initEReference(getMappingActionEvent_Event(), theWidgetsModelPackage
				.getEvent(), null, "event", null, 0, 1,
				MappingActionEvent.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
				!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getMappingActionEvent_ActionType(),
				this.getActionType(), "actionType", null, 0, 1,
				MappingActionEvent.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);

		initEClass(mappingBehaviourEventEClass, MappingBehaviourEvent.class,
				"MappingBehaviourEvent", !IS_ABSTRACT, !IS_INTERFACE,
				IS_GENERATED_INSTANCE_CLASS);
		initEReference(getMappingBehaviourEvent_Event(), theWidgetsModelPackage
				.getEvent(), null, "event", null, 0, 1,
				MappingBehaviourEvent.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
				!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getMappingBehaviourEvent_BehaviorType(), this
				.getBehaviourType(), "behaviorType", null, 0, 1,
				MappingBehaviourEvent.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);

		initEClass(mappingPositionningPropertiesEClass,
				MappingPositionningProperties.class,
				"MappingPositionningProperties", !IS_ABSTRACT, !IS_INTERFACE,
				IS_GENERATED_INSTANCE_CLASS);
		initEReference(getMappingPositionningProperties_Property(),
				theWidgetsModelPackage.getProperty(), null, "property", null,
				1, 1, MappingPositionningProperties.class, !IS_TRANSIENT,
				!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
				!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getMappingPositionningProperties_PositionType(), this
				.getPositionningType(), "positionType", null, 0, 1,
				MappingPositionningProperties.class, !IS_TRANSIENT,
				!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);

		initEClass(mappingTableEClass, MappingTable.class, "MappingTable",
				!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getMappingTable_Name(), ecorePackage.getEString(),
				"name", null, 0, 1, MappingTable.class, !IS_TRANSIENT,
				!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);
		initEReference(getMappingTable_EventsAction(), this
				.getMappingActionEvent(), null, "eventsAction", null, 0, -1,
				MappingTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
				IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
				!IS_DERIVED, IS_ORDERED);
		initEReference(getMappingTable_EventsBehaviors(), this
				.getMappingBehaviourEvent(), null, "eventsBehaviors", null, 0,
				-1, MappingTable.class, !IS_TRANSIENT, !IS_VOLATILE,
				IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
				!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getMappingTable_PropertiesBehaviors(), this
				.getMappingPositionningProperties(), null,
				"propertiesBehaviors", null, 0, -1, MappingTable.class,
				!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
				!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
				IS_ORDERED);

		// Initialize enums and add enum literals
		initEEnum(actionTypeEEnum, ActionType.class, "ActionType");
		addEEnumLiteral(actionTypeEEnum, ActionType.SPACE_LITERAL);
		addEEnumLiteral(actionTypeEEnum, ActionType.CAPTURE_DATA_LITERAL);
		addEEnumLiteral(actionTypeEEnum, ActionType.COMMANDS_LITERAL);

		initEEnum(behaviourTypeEEnum, BehaviourType.class, "BehaviourType");
		addEEnumLiteral(behaviourTypeEEnum, BehaviourType.RENDER_LITERAL);
		addEEnumLiteral(behaviourTypeEEnum, BehaviourType.CONTENT_LITERAL);
		addEEnumLiteral(behaviourTypeEEnum, BehaviourType.LINK_LITERAL);

		initEEnum(positionningTypeEEnum, PositionningType.class,
				"PositionningType");
		addEEnumLiteral(positionningTypeEEnum,
				PositionningType.ABSOLUTE_LITERAL);
		addEEnumLiteral(positionningTypeEEnum,
				PositionningType.RELATIVE_LITERAL);

		// Create resource
		createResource(eNS_URI);
	}

} //MappingtablePackageImpl
